<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Mktprice')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-mktprice" class="form-control" step="0.01" name="row[mktprice]" type="number" value="{$row.mktprice|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-price" class="form-control" step="0.01" name="row[price]" type="number" value="{$row.price|htmlentities}">
        </div>
    </div>
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Costprice')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-costprice" class="form-control" step="0.01" name="row[costprice]" type="number" value="{$row.costprice|htmlentities}">-->
<!--        </div>-->
<!--    </div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-images" class="form-control" size="50" name="row[images]" type="text" value="{$row.images|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-images" class="btn btn-danger faupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-images"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-images"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Goods_cat_id')}:</label>
        <div class="col-xs-12 col-sm-8">
           <input id="c-goods_cat_id" min="0" data-rule="required" data-source="goods_cat/index" data-params='{"custom[status]":1}' class="form-control selectpage" name="row[goods_cat_id]" type="text" value="{$row.goods_cat_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Marketable')}:</label>
        <div class="col-xs-12 col-sm-8">
                        
            <select  id="c-marketable" class="form-control selectpicker" name="row[marketable]">
                {foreach name="marketableList" item="vo"}
                    <option value="{$key}" {in name="key" value="$row.marketable"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Stock')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-stock" min="0" class="form-control" name="row[stock]" type="number" value="{$row.stock|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Unit')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-unit" class="form-control" name="row[unit]" type="text" value="{$row.unit|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Spes_desc')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-spes_desc" class="form-control hidden" rows="5" name="row[spes_desc]" cols="50">{$row.spes_desc|htmlentities}</textarea>
            <dl class="fieldlist" data-name="row[spes_desc]" data-template="testtpl">
                <dd>
                    <a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> 追加</a>
                </dd>
            </dl>
            <script type="text/html" id="testtpl">
                <dd class="form-inline">
                    <input type="text" name="<%=name%>[<%=index%>][name]" class="form-control" value="<%=row['name']%>" size="10">
                    <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span> <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                </dd>
            </script>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-weigh" min="0" class="form-control" name="row[weigh]" type="number" value="{$row.weigh|htmlentities}">
        </div>
    </div>
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Is_recommend')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--                        -->
<!--            <select  id="c-is_recommend" class="form-control selectpicker" name="row[is_recommend]">-->
<!--                {foreach name="isRecommendList" item="vo"}-->
<!--                    <option value="{$key}" {in name="key" value="$row.is_recommend"}selected{/in}>{$vo}</option>-->
<!--                {/foreach}-->
<!--            </select>-->

<!--        </div>-->
<!--    </div>-->
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('New_spec')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <textarea id="c-new_spec" class="form-control " rows="5" name="row[new_spec]" cols="50">{$row.new_spec|htmlentities}</textarea>-->
<!--        </div>-->
<!--    </div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Ship_address')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-ship_address" class="form-control" name="row[ship_address]" type="text" value="{$row.ship_address|htmlentities}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Intro')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-intro" class="form-control editor" rows="40" name="row[intro]" cols="50">{$row.intro|htmlentities}</textarea>
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
        </div>
    </div>
</form>
